<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
  <title>电子商务网站</title>
  <style>
    html, body {
      height: 100%;
      margin: 0;
      font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
      background: url('images/1.jpeg') no-repeat center center fixed;
      background-size: cover;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .container {
      width: 90%;
      max-width: 400px;
      padding: 40px 30px;
      /*box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);*/
      background-color: transparent;
      /*backdrop-filter: blur(5px);*/
      border-radius: 15px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .header {
      margin-bottom: 25px;
      color: white;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    .header h1 {
      margin: 0;
      font-weight: 500;
      font-size: 28px;
    }

    .login-form {
      width: 100%;
      display: flex;
      flex-direction: column;
    }

    .input-group {
      width: 100%;
      margin-bottom: 20px;
    }

    .input-group label {
      display: block;
      margin-bottom: 8px;
      color: white;
      font-weight: 500;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }

    .input-group input {
      width: 100%;
      padding: 12px 15px;
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 8px;
      background-color: rgba(255, 255, 255, 0.2);
      color: white;
      font-size: 15px;
      transition: all 0.3s;
    }

    .input-group input:focus {
      background-color: rgba(255, 255, 255, 0.3);
      outline: none;
      box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
    }

    .input-group input::placeholder {
      color: rgba(255, 255, 255, 0.7);
    }

    .submit-btn {
      width: 100%;
      padding: 12px;
      background-color: rgba(255, 255, 255, 0.3);
      border: 1px solid rgba(255, 255, 255, 0.4);
      border-radius: 8px;
      color: white;
      font-weight: 500;
      font-size: 16px;
      cursor: pointer;
      transition: all 0.3s;
      margin-top: 10px;
    }

    .submit-btn:hover {
      background-color: rgba(255, 255, 255, 0.4);
    }

    .error-message {
      color: #ffdddd;
      margin: 10px 0;
      text-align: center;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }

    .register-link {
      margin-top: 20px;
      color: white;
      text-align: center;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }

    .register-link a {
      color: #e0e0ff;
      text-decoration: none;
      font-weight: 500;
    }

    .register-link a:hover {
      text-decoration: underline;
    }
  </style>
</head>
<body>
<div class="container">
  <div class="header">
    <h1>欢迎回来</h1>
  </div>
  <form class="login-form" action="LoginServlet" method="post">
    <div class="input-group">
      <label for="username">邮箱地址</label>
      <input type="text" id="username" name="email" placeholder="请输入您的邮箱" required />
    </div>
    <div class="input-group">
      <label for="password">密码</label>
      <input type="password" id="password" name="password" placeholder="请输入您的密码" required />
    </div>
    <button type="submit" class="submit-btn">登录</button>
    <p class="error-message">${error}</p>
  </form>
  <p class="register-link">还没有账号？<a href="/chenweilong_war_exploded/Ans2/register.jsp">立即注册</a></p>
</div>
</body>
</html>